import Layout from "../pages/Layout"
import Login from "../pages/Login"
import { createBrowserRouter } from "react-router-dom";
import { AuthRoute } from "@/components/AuthRoute";
import Article from "@/pages/Article";
import Publish from "@/pages/Publish";
import Home from "@/pages/Home";
const router = createBrowserRouter([
  {
    path: '/',
    element: <AuthRoute><Layout /></AuthRoute>,
    children: [
      {
        path: '/',
        element: <Home />
      },
      {
        path: 'publish',
        element: <Publish />
      },
      {
        path: 'article',
        element: <Article />
      }
    ]
  },
  {
    path: '/login',
    element: <Login />
  }
])

export default router